<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script src="./js/vue.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
        <div id="app" >
         <button v-on:click="count +=1">add 1</button>
         <p>this button has {{count}}</p>
         <button v-on:click="greet">dian wo</button>
        </div>
        <script type="text/javascript">  

            var vm=new Vue({
                el:"#app",
                data:{
                    count: 0,
                   name:'robin'
                },
                methods:{
                    greet:function(event){
                        alert('hello '+this.name+ '!')
                        if(event){
                            alert(event.target.tagName)
                        }
                    }
                }

            })
        </script>
    </body>
</html>